package com.bba.manager.common.util;

/**
 * 对数据进行脱敏
 */
public class EncryptUtils {
    /**
     * 对电话号码进行脱敏
     * @param txt
     * @return
     */
    public static String hidePhone(String txt){
        //隐藏前三位
        StringBuilder sb=new StringBuilder(txt.substring(0,3));
        sb.append("*".repeat(txt.length()-7));
        sb.append(txt.substring(txt.length()-4));
        return sb.toString();

    }
}
